package com.aoxon.cargo.component;

import android.app.Activity;
import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;

/**
 * 警告框提醒
 * 
 * @author ZZJ
 * 
 */
public class MyAlertDialog {

	private AlertDialog.Builder builder;
	
	public MyAlertDialog(Activity activity){
		builder = new Builder(activity);
	}
	
	public void show(String strTitle,final MyCallBack myCallBack) {
		builder.setTitle(strTitle);
		builder.setPositiveButton("确认", new DialogInterface.OnClickListener() {
			public void onClick(DialogInterface dialog, int which) {
				myCallBack.callback("");
				dialog.dismiss();
			}
		});
		builder.setNegativeButton("取消", new DialogInterface.OnClickListener() {
			public void onClick(DialogInterface dialog, int which) {
				dialog.dismiss();
			}
		});
		builder.create().show();
	}
}
